var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(f, e, d) {
    if (status == 0 && f == 0) {
        cm.dispose();
        return
    }
    var c = 2;
    var a = 1540879;
    if (cm.getNumberFromQuestInfo(34021, "hero1") == c || cm.getNumberFromQuestInfo(34021, "hero2") == c) {
        cm.sendNormalTalk_Bottom("#face6#我们什么时候出发？", 37, a, false, true);
        cm.dispose();
        return
    }(f == 1) ? status++ : status--;
    selectionLog[status] = d;
    var b = -1;
    if (status <= b++) {
        cm.dispose()
    } else {
        if (status === b++) {
            cm.askMenu_Bottom("龙神，请让我参与阿弗利埃的报仇吧。\r\n#b#L0#一起战斗。#l\r\n#L1#我再考虑考虑。#l", 37, a)
        } else {
            cm.dispose();
            if (d == 0) {
                if (cm.getNumberFromQuestInfo(34021, "hero1") < 0) {
                    cm.setNumberForQuestInfo(34021, "hero1", c);
                    cm.getTopMsgFont("已经选择了第一位英雄，请挑选第二位与其同行的英雄。", 3, 20, 4, 0)
                } else {
                    if (cm.getNumberFromQuestInfo(34021, "hero2") < 0) {
                        cm.setNumberForQuestInfo(34021, "hero2", c);
                        cm.getTopMsgFont("已经选择了两位一起同行的英雄，请通过传送口前往下一个地图。", 3, 20, 4, 0)
                    } else {
                        cm.sendNormalTalk_Bottom("#face3#抱歉，这次只有两个人能参与冲锋。", 37, 1540805, false, true)
                    }
                }
            }
        }
    }
};